package ssi.peeno.model;

import java.security.PublicKey;

public class User {
	private int id;
	private String username;
	private String email;
	private String password;
	private String status;
	private PublicKey pubKey;
	
	public User(String username, String password) {
		this.username = username;
		this.password = password;
	}
	
	public User() {
		
	}

	public User(int id, String username, String email, String status) {
		super();
		this.id = id;
		this.username = username;
		this.email = email;
		this.status = status;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}
	
	public void setUsername(String username) {
		this.username = username;
	}
	
	public String getEmail() {
		return email;
	}
	
	public void setEmail(String email) {
		this.email = email;
	}
	
	public String getPassword() {
		return password;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getStatus() {
		return status;
	}
	
	public void setStatus(String status) {
		this.status = status;
	}
	
	public PublicKey getPubKey() {
		return pubKey;
	}
	
	public void setPubKey(PublicKey pubKey) {
		this.pubKey = pubKey;
	}
	
	public String toString() {
		String stat = "";
		if (status.equals("RESPONSE"))
			stat = "accepted";
		else if (status.equals("REQUEST"))
			stat = "waiting response";
		return username + " " + stat;
	}
}
